#include "mixpro_gantry_app.h"
#include "bsp_module.h"
#include "utils.h"
#include "my_errno.h"
#include "FreeRTOS.h"
#include "task.h"




void taskInitEntry(void* arg)
{

	//bsp_moduleInit();
	if (ESUCCESS != bsp_moduleInit())
  	return;

//  	static int timerCnt;
//  	uint8_t UART1RxBuf[128];

	//bsp_debugComWrite("Hello world", 11, 1000);
	LOG_DEBUG("taskInitEntry\r\n");
	//printf("task Start\r\n");
	static uint8_t timeCnt = 0;
	while (1)
	{
		LOG_DEBUG("timeCnt = %d\r\n", timeCnt++);
//		systemDataRefresh();
//
//		//ptUART1->Recv(ptUART1, UART1RxBuf, 10);
//		if (ESUCCESS == bsp_debugCommRead(UART1RxBuf, 10))
//		{
//			LOG_DEBUG("--> recv %s\r\n", UART1RxBuf);
//		}

		//printf("task Start\r\n");
		vTaskDelay(1000);
	}
}









void gantry_app(void)
{
	//vRegisterSampleCLICommands();
	//vUARTCommandConsoleStart(1024, 1);

	//create_para_task();
	xTaskCreate(taskInitEntry, "init_task", TASK_STK_SIZE_INIT_CTRL, NULL, TASK_PRIO_INIT_CTRL, NULL);
}






